<template>
	<view class="page">
		<image class="bg" src="../../static/img/bg_common.jpg"></image>
		<view class="wrap">
			<view class='info'>
				<view class='line'>
					<view class="tt">手机号</view>
					<input class="input" maxlength="11" type="number" placeholder-style="color:#aaaaaa;font-size:24rpx;" placeholder="输入手机号码" @input='bIphone'/>
				</view>
				<view class="dvd"></view>
				<view class='line'>
					<view class="tt">验证码</view>
					<input class="input" type="number" placeholder-style="color:#aaaaaa;font-size:24rpx;" placeholder="输入短信验证码" @input='bIcode'/>
					<view :style="'background:'+cbColor" class="cd" @tap='cding?"":"btCode"'>
						{{cbStr}}
					</view>
				</view>
			</view>
			
			<button class="btn" @tap="doBind">完成手机绑定</button>
		</view>
	</view>
</template>

<script>
	
	export default {
		data(){
			return{
				phone: '',
				code: '',
				cbStr: "获取验证码",
				cbColor: "#000000",
				cdSec: 60,
				cding: false
			}
		},
		methods: {
			doBind() {
				console.log("绑定")
			}
		},
	}
	
</script>

<style scoped lang="less">

	.page{
		width: 100%;
		height: 100vh;
		margin: 0;
		padding: 0;
		position: relative;
	}
	.bg{
		z-index: -1;
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;left: 0;right: 0;
	}
	.wrap{
		width: 100%;
		height: 100%;
		z-index: 10;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		
		.info{
			width: 670rpx;
			border-radius: 10rpx;
			background: #FFFFFF;
			display: flex;
			flex-direction: column;
			align-items: center;
			.dvd{
				width: 602rpx;
				height: 1rpx;
				background: #c3baa5;
			}
			.line{
				width: 602rpx;
				height: 92rpx;
				display: flex;
				flex-direction: row;
				align-items: center;
				.tt{
					font-size: 26rpx;
					color: #333333;
				}
				.input{
					flex: 1;
					margin-left: 75rpx;
					font-size: 24rpx;
					color: #333333;
				}
				.cd{
					font-size: 24rpx;
					text-align: center;
					color: #FFFFFF;
					width: 150rpx;
					height: 50rpx;
					line-height: 50rpx;
					border-radius: 5rpx;
					margin-left: 10rpx;
				}
			}
		}
		.btn{
			margin-top: 50rpx;
			width: 666rpx;
			height: 76rpx;
			line-height: 76rpx;
			background: black;
			color: #daceb1;
			font-size: 28rpx;
		}
	}
</style>